#ifndef _BUOLA_GUI_COCOA_CNSVIEW_H_
#define _BUOLA_GUI_COCOA_CNSVIEW_H_

#include "auto.h"

namespace buola { namespace gui { namespace cocoa {
    
class CCocoaWindow;
    
/*namespace cocoa*/ } /*namespace gui*/ } /*namespace buola*/ }

@interface CNSView : NSView <NSTextInputClient> 
{
    buola::gui::cocoa::CCocoaWindow *mWindow;
}

- (id)init:(buola::gui::cocoa::CCocoaWindow*)pWindow;

- (void)drawRect:(NSRect)dirtyRect;
- (void)updateGeometry;
- (void)windowNotification : (NSNotification *) windowNotification;

- (BOOL)isFlipped;
- (BOOL)acceptsFirstResponder;

- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;
- (void)mouseUp:(NSEvent *)theEvent;
- (void)mouseMoved:(NSEvent *)theEvent;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
- (void)rightMouseDown:(NSEvent *)theEvent;
- (void)rightMouseDragged:(NSEvent *)theEvent;
- (void)rightMouseUp:(NSEvent *)theEvent;
- (void)otherMouseDown:(NSEvent *)theEvent;
- (void)otherMouseDragged:(NSEvent *)theEvent;
- (void)otherMouseUp:(NSEvent *)theEvent;
- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent;

- (void)keyDown:(NSEvent *)theEvent;
- (void)keyUp:(NSEvent *)theEvent;

- (void)registerDragTypes;
- (NSDragOperation)handleDrag:(id <NSDraggingInfo>)sender;

@end

#endif //QNSVIEW_H
